package com.zhiyin.seal.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.zhiyin.seal.entity.ApplyAttachmentEntity;
import com.zhiyin.seal.entity.ImageEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

import java.util.List;

@Mapper
@Component
public interface FileDao extends BaseMapper {

    Integer insertImage(@Param("image") ImageEntity imageEntity);

    ImageEntity selectImage(@Param("imageName") String imageName);

    Integer insertApplyAttachment(@Param("attachment") ApplyAttachmentEntity attachmentEntity);

    ApplyAttachmentEntity selectApplyAttachment(@Param("fileName") String fileName);

    List<ApplyAttachmentEntity> selectApplyAttachmentList(@Param("applyId") Long applyId);

    Integer updateAttachmentApplyId(@Param("applyId") Long applyId,@Param("fileUrlList") List<String> fileUrls);
}
